//
// Created by liushuai on 2021/1/10.
//

#include "searchInsert.h"
//warning
int searchInsert(std::vector<int>& nums, int target) {
    int result= 0;
    if(nums.size() == 0)
        return 0;
    while (nums[result]<target&&result<nums.size()){
        result++;
    }
    return result;

}